Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce margin for START_OF_MODERN_ERA in delta lake stats #15005

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

raunaqmorarka
Copy link
Member

@raunaqmorarka raunaqmorarka commented Nov 13, 2022

Description

d_date column in TPCDS table date_dim has minimum value of 1900-01-02
This change allows delta lake to provide the correct lower bound instead of NULL in columns statistics to the CBO.
This fixes the query plan for TPCDS q72.

Non-technical explanation

Improve statistics for DATE columns in delta lake

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text:

# Delta Lake
* Improve statistics for DATE columns in delta lake. ({issue}`15005`)

@findepi
Copy link
Member

findepi commented Nov 14, 2022

cc @alexjo2144 @aalbu

@findepi
Copy link
Member

findepi commented Nov 14, 2022

Should there be a change in TestDeltaTpcdsCostBasedPlan ?
(should this test class exist?)

d_date column in TPCDS table date_dim has minimum value of `1900-01-02`
This change allows delta lake to provide the correct lower bound instead
of NULL in columns statistics to the CBO. This fixes the query plan for
TPCDS q72.
@raunaqmorarka
Copy link
Member Author

Should there be a change in TestDeltaTpcdsCostBasedPlan ?
(should this test class exist?)

We don't have Tpc plan checks for delta lake currently, it does look like a good idea to add it at some point.

@raunaqmorarka raunaqmorarka merged commit a4568c2 into trinodb:master Nov 15, 2022
@raunaqmorarka raunaqmorarka deleted the fix-modern-era branch November 15, 2022 04:39
@github-actions github-actions bot added this to the 403 milestone Nov 15, 2022
@findepi
Copy link
Member

findepi commented Nov 15, 2022

We don't have Tpc plan checks for delta lake currently

yes, i know

it does look like a good idea to add it at some point.

what about having an issue so we can plan this work?

@raunaqmorarka
Copy link
Member Author

what about having an issue so we can plan this work?

Created #15045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants